package com.example.taximeter.bean;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 计价器型号
 */
public class TaximeterType {

    @NotNull(message = "计价器型号格式错误", groups =  GroupUpdate.class)
    private Integer id;//计价器型号id--主键

    @NotNull(message = "计价器型号格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    @NotEmpty(message = "计价器型号不能为空", groups = {GroupCreate.class, GroupUpdate.class})
    @Length(min = 0, max = 20, message = "计价器型号格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private String jjqtype;//计价器型号

    @Length(min = 0, max = 100, message = "memo格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private String memo;//memo

    @NotNull(message = "计价器厂商格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private Integer factid;//

    @Override
    public String toString() {
        return "TaximeterType{" +
                "id=" + id +
                ", jjqtype='" + jjqtype + '\'' +
                ", memo='" + memo + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getJjqtype() {
        return jjqtype;
    }

    public void setJjqtype(String jjqtype) {
        this.jjqtype = jjqtype;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getFactid() {
        return factid;
    }

    public void setFactid(Integer factid) {
        this.factid = factid;
    }
}
